package com.lxw.study.creational.abstractfactory.case2;

public class Client {
    public static void main(String[] args) {
        AbstractFactory windowsFactory = new WindowsFactory();
        OperatingSystem windowsOS = windowsFactory.createOperatingSystem();
        Computer windowsComputer = windowsFactory.createComputer();
        windowsComputer.setOperatingSystem(windowsOS);
        windowsComputer.displayInfo();

        AbstractFactory macFactory = new MacFactory();
        OperatingSystem macOS = macFactory.createOperatingSystem();
        Computer macComputer = macFactory.createComputer();
        macComputer.setOperatingSystem(macOS);
        macComputer.displayInfo();
    }
}
